<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>wangEditor example</title>
    <style>
    </style>
</head>

<body>
    <p>
        wangEditor demo
    </p>
    <div id="div1">
        <p>欢迎使用 <b>wangEditor</b> 富文本编辑器1</p>
        <p>
            <img src="http://www.wangeditor.com/imgs/logo.jpeg"/>
        </p>
    </div>
    <hr>
    <div id="div2">
        <p>欢迎使用 <b>wangEditor</b> 富文本编辑器2</p>
    </div>

    <script src="../dist/wangEditor.js"></script>
    <script>
        const E = window.wangEditor

        let editor1 = new E('#div1')
        editor1.config.onchange = function (newHtml) {
            console.log('onchange1', newHtml)
        }
        editor1.create()

        let editor2 = new E('#div2')
        editor2.config.onchange = function (newHtml) {
            console.log('onchange2', newHtml)
        }
        editor2.create()
    </script>
</body>

</html>